The ProgressPanel control provides configurable real time,
interactive statistics on file upload operations on a page. This control becomes visible when a file upload is initiated and displays individual file progress
bars, upload speed, bytes transferred and more. The ProgressPanel also optionally displays a cancel button that can be used to interrupt a file upload
operation in progress.
Customizing the ProgressPanel Look & Feel
The ProgressPanel control has many Appearance and Behavior properties that can be modified to suit your needs and integrate into your overall website design. By default, the ProgressPanel displays a status message, file progress bars, a cancel button, and various upload statistics. The following diagram enumerates the separate components of the ProgressPanel:
StatusText
During a file upload operation the ProgressPanel Status Text changes to reflect the current condition. Default messages for common conditions are set using the following properties:
-
StatusTextUploading - displayed during an upload operation
-
StatusTextComplete - displayed when all files are uploaded successfully
-
StatusTextFailed - displayed when one or more files fail to upload
-
StatusTextCancelled - displayed when an upload operation is cancelled client
Additionally, within any UploadManager event, if the ProgressPanel.StatusText property is set, the new value will be reflected in the browser. This is especially useful if you wish to display custom progress information.
Progress Bars
When a file begins uploading to the server, a new ProgressBar will be added to the ProgressPanel below the Status Text. The ProgressBar can be customized to take on a wide variety of appearances, including the use of images for background and foreground.
Cancel Button
If set to visible, the ProgressPanel Cancel button will be active during an upload operation and inactive at other times. Clicking the Cancel button interrupts the upload operation immediately. If a file upload is cancelled, any file data written to the server file system will remain. Handling the UploadManager.UploadCancelled event is a perfect opportunity to clean up temporary or incomplete files.
Setting the CancelButtonImageUrl and CancelButtonDisabledImageUrl properties will cause the Cancel button to use images instead of a standard Button control.
Upload Statistics
Various upload statistics are displayed during an upload operation below the Progress Bars and Cancel button. These statistics can be hidden or shown using the ShowFileCount, ShowUploadBytes, ShowUploadSpeed, ShowUploadTime properties. Location of the statistics relative to the progress bar(s) can be changed by setting the ProgressBarLocation property to Bottom or Top.
Closing the ProgressPanel
When an upload operation completes or is cancelled, and the CloseBehavior property is set to AutoCloseOnComplete, the ProgressPanel will automatically close itself. If CloseBehavior is set to ManualCloseOnComplete, a "close" link is displayed to allow the user to close the ProgressPanel manually. If CloseBehavior is set to None, the panel will not close automatically and will not show the "close" link, but may still be closed within an UploadManager event using the ProgressPanel.Hide method.